home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CD ROM Paradise Collection 4
/
CD ROM Paradise Collection 4 1995 Nov.iso
/
science
/
sm32a.zip
/
SYMBMATH.H45
< prev
next >
Wrap
Text File
|
1993-11-07
|
1KB
|
50 lines
4.13 Getting parts of expression
4.13.1 Getting type of data
You can get type of data by
type(x)
IN: type(2)
OUT: "integer"
4.13.2 Getting operators
You also can get operators by
type(x)
IN: type(a>b)
OUT: ">"
IN: type(sin(x))
OUT: "sin()"
4.13.3 Getting operatands
The functions
left(x=a), left(a > b)
right(x=a), right(a > b)
pick up the left- and right- side of the equation and inequality.
IN: left(a>b), right(a>b)
OUT: a, b
You can get the j-th term of sum by
member(term(a+b), j)
IN: member(term(a+b), 1)
OUT: a
You can get the arguments of a function by
argue(f(x))
IN: argue(sin(x))
OUT: x
4.13.4 Getting coefficients
A coefficient of x^n in an expression can be picked up by
coef(p, x^n)
IN: coef(a + b*x + c*x^2 + d*x^3, x)
OUT: b
You can get a coefficient of x^n (where 0<= n < 4) in polynomials
ordered up to 4 by
coef(poly, x,n)
(see Chapter 4.8.4 Polynomials for detail).